﻿using DocumentFormat.OpenXml.Lite.DrawingML.Types;
using DocumentFormat.OpenXml.Lite.Shared;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Chart
{
    [XmlRoot("chart", Namespace = Constants.Chart)]
    public class Chart : XmlSerializable
    {
        [Optional]
        [XmlAttribute("id", Namespace = Constants.Relationship, Form = XmlSchemaForm.Qualified)]
        public string RelationshipId { get; set; }

        [Optional]
        [XmlElement("title", Namespace = Constants.Chart)]
        public Title Title { get; set; }

        [Optional]
        [XmlElement("autoTitleDeleted", Namespace = Constants.Chart)]
        public NullableValue<bool> AutoTitleDeleted { get; set; }

        [Optional]
        [XmlElement("floor", Namespace = Constants.Chart)]
        public Wall Floor { get; set; }

        [Optional]
        [XmlElement("sideWall", Namespace = Constants.Chart)]
        public Wall SideWall { get; set; }

        [Optional]
        [XmlElement("plotArea", Namespace = Constants.Chart)]
        public PlotArea PlotArea { get; set; }

        [Optional]
        [XmlElement("backWall", Namespace = Constants.Chart)]
        public Wall BackWall { get; set; }

        [Optional]
        [XmlElement("legend", Namespace = Constants.Chart)]
        public Legend Legend { get; set; }

        [Optional]
        [XmlElement("plotVisOnly", Namespace = Constants.Chart)]
        public NullableValue<bool> PlotVisibleOnly { get; set; }

        [Optional]
        [XmlElement("dispBlanksAs", Namespace = Constants.Chart)]
        public NullableValue<ST_DispBlanksAs> DisplayBlanksAs { get; set; }

        [Optional]
        [XmlElement("showDLblsOverMax", Namespace = Constants.Chart)]
        public NullableValue<bool> ShowDataLabelsOverMaximum { get; set; }

        public Chart() { }
    }
}
